<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var num;
			console.log(num); //undefined
			console.log(typeof(num)); //undefined
			num = null;
			console.log(num); //null
			console.log(typeof(num)); //object
			num = 3.14;
			console.log(num); //3.114
			console.log(typeof(num)); //number
			num = "hello js";
			console.log(num); //hello js
			console.log(typeof(num)); //string
			var m = 3;
			var n = "3";
			if (m == n) {
				console.log(m == n);
			}
			if (m === n) {
				console.log(m === n);
			}
			var str1 = "hello world";
			var str2 = new String("hello js");
			console.log(str1.toUpperCase());
			console.log(str2.toUpperCase());
			console.log(str1.toLowerCase());
			console.log(str2.toLowerCase());
			// 获取指定字符
			var ch = str1.charAt(6);
			console.log(ch);
			console.log(str1.charAt(6));
			//indexof
			var str = "Hello JS and Java";
			console.log(str.indexOf("JS")); // 6
			console.log(str.indexOf("JS", 9)); // -1
			console.log(str.lastIndexOf("JS")); // 6
			//split切割
			var str3 = "how are you doing today";
			var array = str3.split(" ");
			console.log(array);
			console.log(array[1]);
			console.log("2:3:4:5".split(":")) //["2", "3", "4", "5"]
			console.log("2:3:4:5".split(":", 3)) //["2", "3", "4"]
			if(!0){
				console.log('!0');
			}
			console.log(Number.NaN);
			var v = "abd";
			console.log(isNaN(v));
			var v = "123";
			console.log(isNaN(v));
			
		</script>
	</body>
</html>
